import pandas as pd

df = pd.DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6]})

# 获取行索引
print(df.index)
print('---------------------------')

# 获取列索引
print(df.columns)
print('---------------------------')

# 获取值数组
print(df.values)
print('---------------------------')

# 获取快速统计
print(df.describe())
print('---------------------------')

# 转置(行列互换)
print(df.T)
